cmake_minimum_required(VERSION 3.0.2)
project(pcl_test)

# 查找catkin的包
find_package(catkin REQUIRED COMPONENTS
  roscpp
  sensor_msgs
  pcl_conversions
  pcl_ros
)

# 查找PCL
find_package(PCL REQUIRED)

# 声明一个catkin包
catkin_package()

# 指定C++标准
set(CMAKE_CXX_STANDARD 11)

# 添加可执行文件
add_executable(pcl_test src/pcl.cpp)

# 指定要链接的库
target_link_libraries(pcl_test
  ${catkin_LIBRARIES}
  ${PCL_LIBRARIES}
)

# 添加include目录
include_directories(
  ${catkin_INCLUDE_DIRS}
  ${PCL_INCLUDE_DIRS}
)

